You may design your custom objects for X-Plane with a text editor, and design their textures with a graphics program like Photoshop.

There are two ways you can use the objects you design in X-Plane:

1: Custom Object (you design an object like the Golden Gate Bridge and place it where you like in World-Maker... it will appear there and nowhere else)

2: Texture Specification Object (You design a more generic object like a gas station and associate it with a given texture... then, any time that texture shows up on the ground, that object will appear on it in a given location. This is good for building a single generic city block and then having it repeat a lot).

For both uses, the object format is the same, and in fact one object may be used in both ways if you like. Here is how you design the object: Create a TEXT file (not Rich Text Format or any other fancy format... just plain old TEXT). And put the lights, lines, triangles, quads, quad strips, or any other OpenGL primitive in the file that you like. See the example object "Custom Scenery/San Bernardino Example/KSBD_example.obj" for a good example. Now, we present that object here, with comments in bold.

A
700 // file version, leave this alone.
OBJ // indicate this is an object file. leave this alone.

KSBD_example // texture. this texture is used for the entire object. use a different part of the texture for each part of the object if desired. this gives the highest frame-rate. X-Plane will automatically check for LIT texture for night lighting as well.

ATTR_shade_smooth // use smooth not flat shading until you say otherwise. there are 2 types of shading, smooth and flat. smooth shading should be used for rounded surfaces... it will blend the lighting smoothly across the polygons in a given strip or fan. use it for things like cooling towers, which are rounded. use flat-shading for things like sides of square buildings, which do not have their lighting blend smoothly around the corners!

quad_strip 18 // quad strip. 18 verts. xyz st. concrete foundation sides. (verts may be all in a line or paired as I have done) there is NO LIMIT to the number of verts allowed
-16.0 0.0 14.0 0.50 0.00 -12.0 10.0 10.0 0.50 0.50
-14.0 0.0 16.0 1.00 0.00 -10.0 10.0 12.0 1.00 0.50
14.0 0.0 16.0 0.50 0.00 10.0 10.0 12.0 0.50 0.50
16.0 0.0 14.0 1.00 0.00 12.0 10.0 10.0 1.00 0.50
16.0 0.0 -14.0 0.50 0.00 12.0 10.0 -10.0 0.50 0.50
14.0 0.0 -16.0 1.00 0.00 10.0 10.0 -12.0 1.00 0.50
-14.0 0.0 -16.0 0.50 0.00 -10.0 10.0 -12.0 0.50 0.50
-16.0 0.0 -14.0 1.00 0.00 -12.0 10.0 -10.0 1.00 0.50
-16.0 0.0 14.0 0.50 0.00 -12.0 10.0 10.0 0.50 0.50

ATTR_shade_flat // ok you said otherwise. return to flat shading for flat-sided things like building sides

polygon 8 // polygon. 8 verts. xyz st. concrete foundation top. (this polygon should all be in one plane... there will only be one normal vector computed for it!) there is NO LIMIT to the number of verts allowed. of course convex and concave polygons are both allowed, but be sure to set up your "winding order" so that the polygon is vsible from the right side! this is typically CLOCKWISE AS SEEN FROM THE OUTSIDE in X-Plane. OpenGL will automatically close out the polygon by going from the last point back to the first.
-10.0 10.0 -12.0 0.6 0.0
10.0 10.0 -12.0 0.9 0.0
12.0 10.0 -10.0 1.0 0.1
12.0 10.0 10.0 1.0 0.4
10.0 10.0 12.0 0.9 0.5
-10.0 10.0 12.0 0.6 0.5
-12.0 10.0 10.0 0.5 0.4
-12.0 10.0 -10.0 0.5 0.1

quad // quad. xyz st. building side. (this polygon should all be in one plane... there will only be one normal vector computed for it!)
10.0 30.0 -10.0 0.0 1.0
10.0 10.0 -10.0 0.0 0.0
10.0 10.0 10.0 0.5 0.0
10.0 30.0 10.0 0.5 1.0

...

tri_fan 6 // triangle fan. 6 verts. xyz st. slanted part of roof. there is NO LIMIT to the number of verts allowed
0.0 35.0 0.0 0.87 0.75
10.0 30.0 -10.0 1.00 1.00
10.0 30.0 10.0 1.00 0.50
-10.0 30.0 10.0 0.75 0.50
-10.0 30.0 -10.0 0.75 1.00
10.0 30.0 -10.0 1.00 1.00

quad_strip 10 // quad strip. 10 verts. xyz st. girders on roof sides. (verts may be all in a line or paired as I have done)
-8.0 30.0 8.0 0.75 0.50 -8.0 40.0 8.0 0.75 1.0
8.0 30.0 8.0 0.50 0.50 8.0 40.0 8.0 0.50 1.0
8.0 30.0 -8.0 0.75 0.50 8.0 40.0 -8.0 0.75 1.0
-8.0 30.0 -8.0 0.50 0.50 -8.0 40.0 -8.0 0.50 1.0
-8.0 30.0 8.0 0.75 0.50 -8.0 40.0 8.0 0.75 1.0

...

quad // quad. xyz st. girder roof. (this polygon should all be in one plane... there will only be one normal vector computed for it!)
8.0 40.0 8.0 0.75 1.00
-8.0 40.0 8.0 0.50 1.00
-8.0 40.0 -8.0 0.50 0.50
8.0 40.0 -8.0 0.75 0.50

quad // quad. xyz st. girder roof. (this polygon should all be in one plane... there will only be one normal vector computed for it!)
8.0 40.0 -8.0 0.75 0.50
-8.0 40.0 -8.0 0.50 0.50
-8.0 40.0 8.0 0.50 1.00
8.0 40.0 8.0 0.75 1.00

line // antenna on roof, 5 5 5 is red/green/blue color of line, each on a scale of 0 to 10.
-6.0 40.0 -6.0 5 5 5
-6.0 60.0 -6.0 5 5 5

line // antenna on roof, 5 5 5 is red/green/blue color of line, each on a scale of 0 to 10.
6.0 40.0 -6.0 5 5 5
6.0 60.0 -6.0 5 5 5

...

light // light on roof, 10 1 1 is red/green/blue color of light, each on a scale of 0 to 10. (99 99 99 indicates a pulsing red light)
-6.0 60.0 -6.0 10 1 1

light // light on roof, 10 1 1 is red/green/blue color of light, each on a scale of 0 to 10. (98 98 98 indicates a strobe light)
6.0 60.0 -6.0 10 1 1

light // light on roof, 10 1 1 is red/green/blue color of light, each on a scale of 0 to 10. (97 97 97 indicates a traffic light, complete with changing colors!)
-6.0 60.0 6.0 10 1 1

light // light on roof, 10 1 1 is red/green/blue color of light, each on a scale of 0 to 10. (negative numbers indicate a flashing light)
6.0 60.0 6.0 10 1 1
end

Put an "end" at the end of the file to indicate you are done. This is not optional!

Here is a total list of available primitives, most of which you now already know:


"light" // a single light that comes on at night
"line" // a single line
"tri" // a triangle
"quad" // a quad
"quad_hard" // a quad that you can land on.. it is "hard" to airplanes and helos
"smoke_black" // a point from which black smoke is emitted... there should be 4 numbers following a smoke point: x, y, z, and smoke puff size
"smoke_white" // a point from white black smoke is emitted... there should be 4 numbers following a smoke point: x, y, z, and smoke puff size
"quad_movie" // this quad is a drive-in movie quad, showing apple advertisements at night
"polygon" // n-sided polygon, no limit on number of vertices
"quad_strip" // s-poly strip, no limit on number of vertices
"tri_strip" // tri-strip, no limit on number of vertices
"tri_fan" // tri-fan, no limit on number of vertices
"shade_flat" // do flat-shading until further notice
"shade_smooth" // do smooth-shading until further notice
"end" // end the object

Now follow our lead for making your own custom bjkects in the "custom scenery" folder or "resources/autogen objects" folder. When you put objects in the "custom scenery" folder (within a folder for the custom scenery area that you make) you will be able to select them in World-Maker as we have done. When you put them in the "resources/autogen objects" folder they will appear wherever they are referenced as follows: Look inside the Bitmaps/Terrain/City folder. See the outlay0_0_00_0.txt file? This is a file that will draw cars (parked), trees, roads (for cars to drive on), and lights on every polygon that uses that texture. Simply design one city area to cover that polygon, and every time that texture appears, the city you design will be duplicated! You can get the whole world covered in cities very easily that way. And remember, you can do a .txt file FOR ANY TERRAIN BITMAP THERE IS, either in the Terrain folder or for your own custom terrain textures in the Custom Terrain Textures folder. Want to make a special Australian city? Simply do a texture for a single area of the city, drop it in the Custom Terrain Textures folder, and create a text file of the same name with a ".txt" extension using the format of outlay0_0_00_0.txt file to call the objects you make for that city... then put that texture over any polygons you like in World-Maker... now X-Plane will use the texture you assigned, and draw the Australian-style cities on every texture of that type that it comes across. This way, you can quickly get cities customized to your liking over the whole world. Have fun!

austin